package com.zhouxiao.multithreading.runningcallback;

/**
 * @author 周明阳
 * mail:gqzmy@outlook.com
 * 时间:2018-03-13 9:59
 */

public abstract class Animal extends Thread {

    public volatile boolean flag = true;

    public Calltoback calltoback;

    public double length = 1000;

    public abstract void runing();

    @Override
    public void run() {
        while (length > 0 && flag) {
            runing();
        }
    }

}
